package com.bsb.base.common.config;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
 * 视频栏目
 * @author Administrator
 *
 */
public enum VideoCategory {
	COURSE("1","财税课堂"), 	
	TUTOR("2","考前辅导"),
	LIVE("3","直播回顾"),
	COMPETITION("4","技能竞赛");
	
	private String name;  
    private String index;
	private VideoCategory(String index, String name) {
		this.name = name;
		this.index = index;
	}
	
	 public static String getName(String index) {  
        for (VideoCategory c : VideoCategory.values()) {  
            if (c.getIndex().equals(index)) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
	
	 public static List<VideoCategory> getList(){
		 List<VideoCategory> list = new ArrayList<VideoCategory>(Arrays.asList(VideoCategory.values()));
		 return list;
	 }
	 
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getIndex() {
		return index;
	}
	public void setIndex(String index) {
		this.index = index;
	}
	
}
